package qq.android.wan.qq.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;

import qq.android.wan.qq.R;

/**
 * Created by Administrator on 2015/12/10.
 */
public class LogoActivity extends Activity {
    private LinearLayout layout_animation;
    private View view;
    private Button btn_login,btn_registe;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.e("test","SDK:"+Build.VERSION.SDK_INT);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }
        setContentView(R.layout.activity_logo);
        view = getLayoutInflater().inflate(R.layout.activity_logo, null);
        initUI();
        Animation animation1 = AnimationUtils.loadAnimation(LogoActivity.this, R.anim.animation_login);
        layout_animation.startAnimation(animation1);
        btn_login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(LogoActivity.this, LoginActivity.class);
                startActivity(intent);
                finish();
            }
        });
        btn_registe.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(LogoActivity.this, RegisteActivity.class);
                startActivity(intent);
            }
        });

    }

    private void initUI() {
        layout_animation = (LinearLayout) findViewById(R.id.layout_animation);
        btn_login=(Button)findViewById(R.id.btn_login);
        btn_registe=(Button)findViewById(R.id.btn_registe);
    }
}
